package day05;
import java.util.Arrays;
import java.util.Scanner;
public class Test01 {
    public static void main(String[] args) {
        /*
        Scanner scan = new Scanner(System.in);
        System.out.println("请输入你新设置的密码：");
        int passage = scan.nextInt();
        System.out.println("新密码："+passage);

        System.out.println("选择一个月份");
        int mouth = scan.nextInt();
        switch (mouth){
            case 1:
            case 3:
            case 5:
            case 7:
            case 8:
            case 10:
            case 12:
                System.out.println("该月有31天");
                break;
            default:
                System.out.println("该月不足31天");

        }
        for(int num=1;num<=9;num++){
            if(num%3==0){
                continue; //跳过循环体中剩余语句而进入下一次循环
            }
            System.out.println(num+"*9="+num*9);
        }


        int[]arr;
        arr=new int[5];
        System.out.println(arr[0]);
        */
        int[]a={10,20,50,30,40};
        int[]b=new int[6];
        System.arraycopy(a,1,b,0,3);
        for (int i =0;i<b.length;i++){
            System.out.println(b[i]);
        }

        int[]c= Arrays.copyOf(a,4);
        System.arraycopy(a,1,b,0,3);
        for (int j =0;j<c.length;j++){
            System.out.println(c[j]);
        }
    }
}
